package com.yby.dome10;

public class Test {
    public static void main(String[] args) {
        Instrument instrument = new Erhu();
        Instrument instrument1 = new Piano();
        Instrument instrument2 = new Violin();
        Musician musician = new Musician();
        musician.play(instrument);
        instrument.makeSound();
        musician.play(instrument1);
        instrument1.makeSound();
        musician.play(instrument2);
        instrument2.makeSound();
    }
}
